<template>
  <div>
    <el-container>
      <el-aside width="300px">
        <!-- 菜单 -->
        <el-menu
          router
          background-color="skyblue"
          text-color="red"
          active-text-color="pink"
          :default-active="$route.path"
          unique-opened
        >
          <el-submenu index='223'>
            <template #title>早饭</template>
            <el-menu-item index='/dashboard'>小笼包</el-menu-item>
            <el-menu-item index='2'>混沌</el-menu-item>
          </el-submenu>

          <el-submenu index='443'>
            <template #title>午饭</template>
            <el-menu-item index='/article'>米饭</el-menu-item>
            <el-submenu index="22">
              <template #title>包子</template>
              <el-menu-item index='5'>猪肉大葱</el-menu-item>
              <el-menu-item index='5'>牛肉大葱</el-menu-item>
            </el-submenu>
          </el-submenu>

        </el-menu>
      </el-aside>
      <el-container>
        <el-header>Header</el-header>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'MyTest'
}
</script>

<style lang="scss">
// element标签名就是类名
.el-container {
  // vh设备高度
  height: 100vh;
  .el-aside {
    height: 100%;
    background-color: pink;
  }
  .el-header {
    background-color: orange;
  }
}
</style>
